import { IsEmail, IsString, MinLength, MaxLength, IsOptional } from 'class-validator';

/**
 * 创建用户 DTO
 */
export class CreateUserDto {
  @IsEmail()
  email: string;

  @IsString()
  @MinLength(6)
  @MaxLength(20)
  password: string;

  @IsString()
  @IsOptional()
  @MaxLength(100)
  nickname?: string;

  @IsString()
  @IsOptional()
  avatar?: string;
}





